import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/productionPlantManage/getList',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const getPage = (current, size, params) => {
  return request({
    url: '/api/productionPlantManage/getPage',
    method: 'get',
    params: {
      ...params,
      current,
      size,
    }
  })
}

export const remove = (ids) => {
  return request({
    url: '/api/productionPlantManage/delete',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/productionPlantManage/save',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/productionPlantManage/update',
    method: 'post',
    data: row
  })
}

export const getProdPlant = (id) => {
  return request({
    url: '/api/productionPlantManage/getDetail',
    method: 'get',
    params: {
      id
    }
  })
}
export const bindingCamera = (ids, id) => {
  return request({
    url: '/api/productionPlantManage/cameraBinding',
    method: 'post',
    params: {
      ids,
      id
    }
  })
}
export const num = () => {
  return request({
    url: '/api/productionPlantManage/getNum',
    method: 'get',
  })
}
export const getCameraList = () => {
  return request({
    url: '/api/productionPlantManage/getCameraList',
    method: 'get',
  })
}

export const getZdwxymcLinkInfo = (zdwxymc) => {
  return request({
    url: '/api/productionPlantManage/getZdwxymcLinkInfo',
    method: 'get',
    params:{
      zdwxymc,
    }
  })
}

export const getPicFiles = (fileIds) => {
  return request({
    url: '/api/fileManager/files/fileIds',
    method: 'get',
    params:{
      fileIds,
    }
  })
}

export const removePic = (ids) => {
  return request({
    url: '/api/fileManager/remove',
    method: 'post',
    params:{
      ids,
    }
  })
}

// 上传多个文件
export const uploadFiles = (files) => {
  return request({
    url: '/api/fileManager/upload/files',
    method: 'post',
    data: files
  })
}









